<template>
  <div>
    <van-row>
      <van-col span="24">
        <van-nav-bar
            title="选择地址"
            :fixed="true"
            placeholder
            @click-left="Return"
        >
          <template #left>
            <van-icon  style="font-weight: bolder;" color="#000000"  size="22" name="arrow-left" />
          </template>
        </van-nav-bar>
      </van-col>

      <van-col span="24" style="margin-top: .3rem;">
        <van-address-list
            v-model="chosenAddressId"
            :list="list"
            @select="selectAddress"
            :disabled-list="disabledList"
            disabled-text="以下地址超出配送范围"
            add-button-text="保存"
            default-tag-text="默认"
        />

      </van-col>
    </van-row>
  </div>
</template>

<script>

export default {
  name: "PayAddress",
  data() {
    return {
      chosenAddressId: '1',
      list: [
        {
          id: '1',
          name: 'Herther',
          tel: '13000000000',
          address: '福建省厦门市集美区后溪镇版南路1251号',
          isDefault: true,
        }
      ],
      disabledList: [
        {
          id: '3',
          name: '王五',
          tel: '1320000000',
          address: '浙江省杭州市滨江区江南大道 15 号',
        },
      ],
    };
  },
  methods:{
    Return(){
      this.$router.replace("/Pay")
    },
    selectAddress(item,index){
      this.$toast.loading({
        message: '加载中...',
        forbidClick: true,
        onClose: ()=>{ this.$router.replace("/Pay")}
      });

    }


  },
  computed:{

  },
}
</script>

<style scoped>

</style>
